Skip to content

feat: add task abstraction - #8

Merged
dmanslick merged 1 commit into
mainfrom
task-abstraction
Sep 25, 2026
Merged

dmanslick merged 1 commit into
mainfrom
task-abstraction

Conversation

@wispl

@wispl wispl commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

WIP, need to clear a couple of design decisions first and do a bit of testing before this can be merged

  1. is Registry and pubsub an okay pattern (we no longer have to pass taskhandles around)
  2. Is DoubleBuffer worth it (slightly cleaner code and maybe better performance)

Other than that, everything else is fairly standard.

TODO: we need something to unsubscribe from the Registry, assuming we are keeping that model.

@ncorrea210 ncorrea210 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine for the most part. It is a bit confusing to me how initialization looks for these tasks though. Is initialization done at construction? Is it expected that things like sensors are already initialized when handed off to the task?

@wispl

wispl commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator Author

These are created and used the same way as the sensors and flash. We construct them and then call an init function. Sensors and other devices are expected to initialized before being passed to tasks. You can think of tasks as an optional extension of sensors and other devices.

@ncorrea210 ncorrea210 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this has been tested, i approve it

@dmanslick

Copy link
Copy Markdown

LGTM

@dmanslick
dmanslick merged commit b547ad3 into main Sep 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants